package com.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.common.ajax.AjaxRes;
import com.common.utils.base.UuidUtil;
import com.controller.base.BaseController;
import com.entity.ChanPingDuiJie;
import com.service.ChanPingDuiJieService;

@Controller
@RequestMapping("/chanpingduijie/manager")
public class ChanPingDuiJieController extends BaseController<ChanPingDuiJie>{
	
	@Autowired
	private ChanPingDuiJieService cpdjService;
	
	@RequestMapping("/addcpdj")
	@ResponseBody
	public AjaxRes addcpdj(String cpId,String yhId){
		AjaxRes res = new AjaxRes();
		String djId=UuidUtil.get32UUID();
		ChanPingDuiJie dj = new ChanPingDuiJie();
		dj.setId(djId);
		dj.setDjzt(1);
		dj.setYhxx("1");
		dj.setCpbh(cpId);
		cpdjService.insert(dj);
		res.setResMsg("对接成功");
		return res;
	}
}
